package com.crr.mall.product.dao;

import com.crr.mall.product.entity.CategoryBrandRelationEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 品牌分类关联
 * 
 * @author chenrenren
 * @email chenrenren@gmail.com
 * @date 2024-12-06 17:50:14
 */
@Mapper
public interface CategoryBrandRelationDao extends BaseMapper<CategoryBrandRelationEntity> {
    /**
     * 新增品牌分类关联信息
     * @return
     */
    int saveDetail(@Param("brandId") Long brandId,@Param("catelogId") Long catelogId);

    /**
     * 品牌修改时的级联修改
     * @param brandId
     * @param brandName
     * @return
     */
    int updateBrandNameByBrandId(@Param("brandId") Long brandId,@Param("brandName") String brandName);
    /**
     * 分类修改时的级联修改
     * @param catelogId
     * @param catelogName
     * @return
     */
    int  updateCategoryNameByCategoryId(@Param("catelogId") Long catelogId,@Param("catelogName") String catelogName);
    /**
     * 根据catId关联表查询品牌信息
     * @param catId
     * @return
     */
    List<Map> queryByCatId(Long catId);

}
